package com.sayice.robotconflict.entity;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.FieldType;
import org.springframework.data.mongodb.core.mapping.MongoId;

import java.io.Serializable;
import java.util.List;

/**
 * 背包
 *
 * @author shubing
 */
@Getter
@Setter
@ToString
@Document("bag")
public class BagEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    
    /**
     * ID
     */
    @MongoId(FieldType.OBJECT_ID)
    private String id;
    
    /**
     * 玩家 ID
     */
    private String playerId;
    
    /**
     * 机器人
     */
    List<RobotEntity> robots;
    
    public BagEntity() {
    }
    
    public BagEntity(String playerId, List<RobotEntity> robots) {
        this.playerId = playerId;
        this.robots = robots;
    }
}
